import{ft as e}from"./B603vO-13smUKN.js";var t,n=e;function r(e){return Math.floor(e/1e4)}function i(e){return Math.floor(e/100%100)}function a(e){return Math.floor(e%100)}function o(e,t=!1){return t?new Date(`${f(e)}T00:00:00.000Z`):new Date(e/1e4,Math.max(0,e/100%100-1),Math.max(1,e%100))}function s(){return t??l(new Date)}function c(e,t=!1){if(typeof e==`number`)return e<100?void 0:e;if(typeof e==`string`)return m(e);if(Array.isArray(e)&&e.length>=1)return p(...e);if(e instanceof Date)return l(e,t)}function l(e,t=!1){return t?m(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}function u(e,t=!0){return o(e,t).getTime()}function d(e,t=!0){return l(new Date(e),t)}function f(e,t=`-`){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}function p(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}function m(e){let t=String(e).replace(/\D/g,``).slice(0,8);if(t.length===8)return+t}function h(e,t=0){let n=r(e),a=i(e);return t!==0&&(a+=t,n+=Math.floor((a-1)/12),a=Math.floor((a-1)%12)+1,a===0&&(a=12)),p(n,a,1)}function g(e,t){let n=r(e),o=i(e),s=a(e);t!==0&&(o+=t,n+=Math.floor((o-1)/12),o=Math.floor((o-1)%12)+1,o===0&&(o=12));let c=y(n,o);return p(n,o,Math.min(s,c))}function _(e,t=0){return p(r(e)+t,1,1)}function v(e,t){let n=r(e)+t,o=i(e),s=a(e),c=y(n,o);return p(n,o,Math.min(s,c))}function y(e,t){return new Date(Date.UTC(e,t,0)).getUTCDate()}function b(t,n){return d(u(t)+n*e)}function x(t,n){return Math.round((u(n)-u(t))/e)}export{p as a,i as c,b as d,o as f,_ as g,v as h,l as i,g as l,r as m,x as n,m as o,f as p,c as r,s,n as t,h as u};